`ifndef ADD16_V
`define ADD16_V

`include "FullAddr.v"

module Add16(input [15:0] a, b, input cin, output [15:0] sum, output cout);
    wire [15:0] carry;
    FullAddr fullAddr1(a[0], b[0], cin, sum[0], carry[0]);
    FullAddr fullAddr2(a[1], b[1], carry[0], sum[1], carry[1]);
    FullAddr fullAddr3(a[2], b[2], carry[1], sum[2], carry[2]);
    FullAddr fullAddr4(a[3], b[3], carry[2], sum[3], carry[3]);
    FullAddr fullAddr5(a[4], b[4], carry[3], sum[4], carry[4]);
    FullAddr fullAddr6(a[5], b[5], carry[4], sum[5], carry[5]);
    FullAddr fullAddr7(a[6], b[6], carry[5], sum[6], carry[6]);
    FullAddr fullAddr8(a[7], b[7], carry[6], sum[7], carry[7]);
    FullAddr fullAddr9(a[8], b[8], carry[7], sum[8], carry[8]);
    FullAddr fullAddr10(a[9], b[9], carry[8], sum[9], carry[9]);
    FullAddr fullAddr11(a[10], b[10], carry[9], sum[10], carry[10]);
    FullAddr fullAddr12(a[11], b[11], carry[10], sum[11], carry[11]);
    FullAddr fullAddr13(a[12], b[12], carry[11], sum[12], carry[12]);
    FullAddr fullAddr14(a[13], b[13], carry[12], sum[13], carry[13]);
    FullAddr fullAddr15(a[14], b[14], carry[13], sum[14], carry[14]);
    FullAddr fullAddr16(a[15], b[15], carry[14], sum[15], carry[15]);
    assign cout = carry[15];
endmodule
`endif  